package com.time.workshop.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.time.workshop.R;
import com.time.workshop.SuperActivity;
import com.time.workshop.injector.Injector;
import com.time.workshop.injector.V;

/**
 * @author fanbaolong
 *  老人服务列表
 */
public class LaoRenListActivity extends SuperActivity{

	@V
	RelativeLayout laoren_liaotian , laoren_maicai , laoren_dashao;
	@V
	private ImageView img_login_back;

	@Override
	protected void onCreate(Bundle bundle) {
		super.onCreate(bundle);
		setContentView(R.layout.activity_laoren_list);
		
		init();
	}

	private void init(){
		Injector.getInstance().inject(this);

		laoren_liaotian.setOnClickListener(this);
		laoren_maicai.setOnClickListener(this);
		laoren_dashao.setOnClickListener(this);
		img_login_back.setOnClickListener(this);
		
	}


	public void onClick(View v){
		switch (v.getId()) {
		case R.id.img_login_back:
			back();
			break;
		case R.id.laoren_liaotian:
			toac(getResources().getString(R.string.chatting));
			break;
		case R.id.laoren_maicai:
			toac(getResources().getString(R.string.shopping));
			break;
		case R.id.laoren_dashao:
			toac(getResources().getString(R.string.cleaning));
			break;

		default:
			break;
		}
	}
	
	private void toac(String sType){
		Intent intent = new Intent(LaoRenListActivity.this,LaoRenActivity.class);
		intent.putExtra("type", sType);
		startActivity(intent);
	}

}
